import logging


# logging.basicConfig(
#     format='%(asctime)s-%(name)s-%(levelname)s-%(module)s: %(message)s',
#     datefmt='%Y-%m-%d %H:%M%S %p'
#
# )
# logging.warning('warning message test2')

# 1.无论你希望日志里打印哪些内容,都得你自己写,没有自动生成日志这种事儿
# logging.basicconfig
# 输出到屏幕
logging.basicConfig(
    format='%(asctime)s - %(name)s - %(levelname)s[line :%(lineno)d]-%(module)s:  %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S %p',
)
logging.warning('warning message test2')
logging.error('error message test2')
logging.critical('critical message test2')

